from rest_framework import serializers

from users.models import Spit

class CommentModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = Spit
        fields = '__all__'

class SpitModelSerializer(serializers.ModelSerializer):
    comment =  CommentModelSerializer(read_only=True, many=True)
    # share = serializers.IntegerField()
    # state = serializers.CharField()
    # parent = serializers.StringRelatedField(many=True)

    class Meta:
        model = Spit
        fields = '__all__'